package com.atguigu.service.impl;

import com.atguigu.mapper.EmpMapper;
import com.atguigu.pojo.Employee;
import com.atguigu.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: liuaojun
 * @CreateTime: 2025-01-18
 * @Description:
 * @Version: 1.0
 */
@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    private EmpMapper empMapper;

    @Override
    public void add(Employee employee) {
        empMapper.add(employee);
    }

    @Override
    public void update(Employee employee) {
        empMapper.update(employee);
    }

    @Override
    public void delete(Integer id) {
        empMapper.delete(id);
    }

    @Override
    public Employee SelectEmpById(Integer id) {
        return empMapper.SelectEmpById(id);
    }

    @Override
    public List<Employee> SelectAllEmp() {
        return empMapper.SelectAllEmp();
    }
}
